ListBox.InvalidateCell Method
Redraws the specified cell "from scratch," rather than using the data in the internal buffer. If you pass a -1 as the Row or Column parameter, it will redraw the specified entire row or column, i.e., Invalidate(2,-1) redraws row 2.
Syntax
ListBox.InvalidateCell Row, Column
Parameters | |
Row |
|
Column |
The CellBackgroundPaint and CellTextPaint events execute when InvalidateCell is called.
InvalidateCell should be necessary only if you are using a custom storage mechanism for your ListBox data. If the contents of the ListBox are stored in the ListBox cells, the ListBox will update automatically as needed.
This method doesn't have a high overhead if used unnecessarily since nothing will happen if the specified cell is not visible.